<?php
    $this->load->view('wx/public/header.html', [
        'time' => time(),
       'css' => [
            'assets/wx/css/order.css',
        ]
    ]);
?>

<body class="order" ng-controller="wx-order-pay-controller">

<!--地址-->
<div class="aui-content aui-margin-b-10 gu-address-top">
    <ul class="aui-list aui-media-list">
        <li class="aui-list-item aui-list-item-arrow gu-item-bg" ng-click="selectAddr()">
            <div class="aui-media-list-item-inner aui-margin-l-15">
                <div class="aui-list-item-inner">
                    <i class="aui-iconfont aui-icon-location gu-location-icon"></i>
                    <div class="aui-list-item-text">
                        <div class="aui-list-item-title aui-font-size-14" ng-bind="address.name"></div>
                        <div class="aui-list-item-right aui-font-size-12" ng-bind="address.phone"></div>
                    </div>
                    <div class="aui-list-item-text aui-ellipsis-1 aui-font-size-12" ng-bind="address.address"></div>
                </div>
            </div>
        </li>
    </ul>
</div>

<!--商品-->

<section class="aui-content">
    <div class="aui-card-list gu-order-card-list-item">
        <div class="aui-card-list-header gu-order-sn aui-padded-l-10 aui-padded-r-10">
            <span class="aui-pull-left aui-font-size-14">订单详情</span>
        </div>
        <div class="aui-card-list-content">
            <ul class="aui-list aui-media-list">
                <li class="aui-list-item gu-lists" ng-repeat="g in goods">
                    <div class="aui-media-list-item-inner">
                        <div class="aui-list-item-media gu-confirm-thumb">
                            <img ng-src="{{ g.thumb }}">
                        </div>

                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-text aui-margin-b-15">
                                <div class="aui-list-item-title aui-ellipsis-2 gu-order-goods-name aui-font-size-12" ng-bind="g.goodsName"></div>
                                <div class="aui-list-item-right gu-order-price aui-font-size-16" ng-bind="'￥ ' + g.price"></div>
                            </div>
                            <div class="aui-info aui-margin-t-10 aui-margin-l-0 aui-margin-r-0 gu-info-item" style="padding:0">
                                <div class="aui-info-item"></div>
                                <div class="aui-info-item" ng-bind="'数量: ' + g.num"></div>
                            </div>
                        </div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title aui-font-size-14 gu-express-left">配送方式</div>
                        <div class="aui-list-item-right gu-express-right">物流/快递</div>
                    </div>
                </li>
            </ul>
        </div>
    </div>

</section>

<!--留言-->
<div class="aui-content aui-margin-b-10">
    <ul class="aui-list aui-form-list">
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-input">
                    <textarea class="aui-font-size-14 gu-order-message" placeholder="选填：给商家留言（90字以内）" ng-model="message"></textarea>
                </div>
            </div>
        </li>
    </ul>
</div>

<!--价格-->
<div class="aui-content aui-margin-b-10">
    <ul class="aui-list aui-list-in">
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-title aui-font-size-14 gu-price-title">商品价格</div>
                <div class="aui-list-item-right aui-font-size-14 gu-price-desc" ng-bind="'￥ ' + order.goodsPrice"></div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-title aui-font-size-14">
                    物流费用
                </div>
                <div class="aui-list-item-right aui-font-size-14 gu-price-desc" ng-bind="'￥ ' + order.expressPrice"></div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-title aui-font-size-14">优惠券</div>
                <div class="aui-list-item-right aui-font-size-14" ng-bind="'- ￥ ' + order.voucherPrice"></div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-title aui-font-size-14">余额支付</div>
                <div class="aui-list-item-right aui-font-size-14" ng-bind="'- ￥ ' + order.balancePrice"></div>
            </div>
        </li>
    </ul>
</div>

<div class="aui-content aui-margin-b-10">
    <ul class="aui-list aui-list-in">
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-title aui-font-size-14">订单编号</div>
                <div class="aui-list-item-right aui-font-size-14" ng-bind="order.sn"></div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-title aui-font-size-14">下单时间</div>
                <div class="aui-list-item-right aui-font-size-14" ng-bind="order.created"></div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-title aui-font-size-14">支付方式</div>
                <div class="aui-list-item-right aui-font-size-14">在线支付</div>
            </div>
        </li>
    </ul>
</div>

<footer class="aui-bar aui-bar-tab gu-comfirm-footer" id="footer">
    <div class="aui-bar-tab-item aui-active gu-comfirm-footer-left">
        <div class="aui-bar-tab-label aui-font-size-14 aui-text-right aui-padded-r-5">实付款:<span ng-bind="'￥' + order.totalPrice"></span></div>
    </div>
    <div class="aui-bar-tab-item gu-comfirm-footer-right" ng-class="{'active': isSubmitting}">
        <div class="aui-bar-tab-label aui-font-size-16" ng-click="add()">立即支付</div>
    </div>
</footer>


<?php
    $this->load->view('wx/public/footer.html', [
        'time' => time(),
        'js' => [
            'assets/wx/js/order/pay.js'
        ]
    ]);
?>
